package com.example.xlmkotlinwanandroid.data

/**
 *  author : cailei
 *  date : 2022/3/18
 *  description :
 */
sealed class Resource<T>(
    var data: T? = null,
    var errorCode: Int = 0,
    var errorMsg: String = "",
) {
    class Success<T>(data: T) : Resource<T>(data)
    class Loading<T>(data: T? = null) : Resource<T>(data)
    class DataError<T>(errorCode: Int) : Resource<T>(null, errorCode)
}